<span page-title ng-model="host">{{ 'Packages for: ' | translate }} {{ host.name }}</span>

<h3 translate>Installed Packages</h3>

<div ng-show="katelloAgentPresent" data-extend-template="common/views/katello-agent-notice.html"></div>

<section ng-hide="denied('edit_hosts', host)" bst-feature-flag="remote_actions">
  <p bst-alert="warning" ng-hide="hostToolingEnabled">
    <span translate>
      Performing host package actions is disabled because Katello is not configured for Remote Execution or Katello Agent.
      </span>
  </p>
</section>

<div data-extend-template="layouts/partials/table.html">
  <span data-block="no-rows-message" translate>
    The host has not reported any installed packages, registering with subscription-manager should cause these to be reported.
  </span>

  <span data-block="no-search-results-message" translate>
    Your search returned zero Packages.
  </span>

  <div data-block="list-actions" bst-feature-flag="remote_actions">
    <button class="btn btn-default" type="button"
            ng-hide="denied('edit_hosts', host)"
            ng-disabled="working || table.numSelected === 0 || !hostToolingEnabled"
            ng-click="removeSelectedPackages()">
      <span translate>Remove Selected</span>
    </button>
  </div>

  <div data-block="table">
    <table bst-table="table" ng-class="{'table-mask': table.working}"
           class="table table-striped table-bordered">
      <thead>
      <tr bst-table-head row-select>
        <th bst-table-column="name" translate>Installed Package</th>
      </tr>
      </thead>

      <tbody>
        <tr bst-table-row ng-repeat="package in table.rows" row-select="package">
          <td bst-table-cell>{{ package.nvrea }}</td>
        </tr>
      </tbody>
    </table>
  </div>
</div>

